package com.bilgeadam.hibernate.model.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 
 * @author Bora SAYINER
 * @since Nov 21, 2014 3:55:37 PM
 * @version 1.0.0
 */
@Entity
@Table(name = "EMPLOYEES")
@SequenceGenerator(name = "SEQ_GEN", sequenceName = "EMP_SEQ", initialValue = 1, allocationSize = 1)
public class Employee extends AbstractEntity<Long> {

	private String firstName;
	private String lastName;
	private double salary;

	@Column(name = "FIRST_NAME", length = 50, nullable = false)
	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	@Column(name = "LAST_NAME", length = 50, nullable = false)
	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Column(name = "SALARY")
	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	@Override
	public String toString() {
		return "Employee [firstName=" + firstName + ", lastName=" + lastName + ", salary=" + salary + "]";
	}

}
